package com.chenshu.transaction.service;

import com.chenshu.transaction.mapper.UserMapper;
import com.chenshu.transaction.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2024-04-26
 * Time：14:46
 */
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    @Transactional(propagation = Propagation.NESTED)
    public Integer insertUser(UserInfo userInfo) {
        return userMapper.insertUser(userInfo);
    }
}
